package demo;

public class Circle extends Shape{
    private double r;//半径
    final static double PI=3.14;

    public Circle(double r){
        this.r=r;
    }
    //重写抽象类方法
    @Override
    public void draw(){
        System.out.println("圆的半径："+r);
    }
    @Override
    public void calArea(){
        System.out.println("圆的面积："+PI*r*r);
    }

}
